package adv6;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;

public class ObjRead {

	public static void main(String[] args) {
		// TODO 自动生成的方法存根
		try {
			ObjectInputStream oin = new ObjectInputStream(new FileInputStream(
					"stu.obj"));
			Student2 s = (Student2) oin.readObject();
			oin.close();
			System.out.println(s);
		} catch (Exception e) {
			// TODO 自动生成的 catch 块
			e.printStackTrace();
		}
	}

}
